package cn.mesmile.workflow.process.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.flowable.engine.repository.ProcessDefinition;

import java.io.Serializable;

/**
 * @author zb
 * @Description
 */
@ApiModel(description = "流程定义相关")
@Data
public class ProcessDefinitionVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("流程定义id")
    private String processDefId;

    @ApiModelProperty("流程定义Key")
    private String processDefKey;

    @ApiModelProperty("流程定义名称")
    private String processDefName;

    @ApiModelProperty("流程定义分类")
    private String processDefCategory;

    @ApiModelProperty("流程定义对应的部署id")
    private String deploymentId;

    @ApiModelProperty("流程定义版本")
    private Integer version;

    @ApiModelProperty("描述")
    private String description;

    public ProcessDefinitionVO(ProcessDefinition processDefinition){
        this.processDefId = processDefinition.getId();
        this.processDefKey = processDefinition.getKey();
        this.processDefName = processDefinition.getName();
        this.processDefCategory = processDefinition.getCategory();
        this.deploymentId = processDefinition.getDeploymentId();
        this.version = processDefinition.getVersion();
        this.description = processDefinition.getDescription();
    }

    public ProcessDefinitionVO(){}
}
